package dataClean;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @author Smartloe
 * @create 2021-04-25 16:40
 */
//提取<a>标签内容
public class RegDemo {
    public static void main(String[] args) {
        String  str = "<a href=,5094.1>大国工匠精神：精益求精、持之以恒、爱岗敬业、守正创新</a>";
        Pattern p = Pattern.compile("<a[^>]*>([^<]*)</a>");
        Matcher m = p.matcher(str);
        while(m.find()) {
            System.out.println(m.group(1));
        }
    }
}

